package com.xu.demo.filterPattern;

import java.util.List;

/**
 * 过滤已满足18岁的同学
 */
public class AgeFilter implements IFilter {

    @Override
    public List<Person> filterOperate(List<Person> personList) {
        return personList.stream().filter(person ->
                person.getAge() > 25).toList();
    }
}